var app = sm("do_App");
var page = sm("do_Page");
var storage = sm("do_Storage");
var nf = sm("do_Notification");
var easemob = sm("do_Easemob");
var imHelper = require("helper/im");

page.on("loaded",function(){
	var groupId = page.getData().groupId;
	imHelper.loadGroupByGroupId(groupId,function(imGroup){
		imGroup.type="GroupChat";
		page.fire({name:"transport", data:imGroup});
	});
	
})

//当返回聊页时，如果上一个页面是退出或解散群操作，再关一个页面
page.on("result", function(data){
	if (data.dismissGroup || data.quitGroup) {
		app.closePage({dismissGroup:true});
    }
});